{include file="header.html"}
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="../htmleditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
$(function(){
    $('#courseqa_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        rules : {
            question : {
                required : true
            },
            answer :{
                required : true
            }
        },
        messages : {
            question : {
                required : '{$lang.question_empty}'
            },
            answer : {
                required : '{$lang.answer_empty}'
            }
        }
    });
});
</script>
<div id="rightTop">
    <p>{$lang.courseqa}</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=courseqa">{$lang.manage}</a></li>
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="courseqa_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">
                    {$lang.question}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput" id="question" type="text" name="question" value="{$courseqa.question|escape}" />
                </td>
            </tr>
             <tr>
                <th class="paddingT15">
                    <label for="is_show">是否显示:</label></th>
                <td class="paddingT15 wordSpacing5">
                    <input type="checkbox" name="is_show" id="is_show"  value="1" {if $courseqa.is_show}checked{/if}/>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    <label for="answer">{$lang.answer}:</label></th>
                <td class="paddingT15 wordSpacing5">                
                    <textarea id="answer" name="answer" style="width:400px;height:100px;">{$courseqa.answer|escape}</textarea>
                </td>
            </tr>
            <tr>
                <th></th>
                <td class="ptb20">
                    <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                    <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
                </td>
            </tr>
        </table>
    </form>
</div>
{include file="footer.html"}